//
//  GRFMDownloadManager.h
//  GRFMDownloader_Example
//
//  Created by Guo Rui on 2018/1/12.
//  Copyright © 2018年 GR. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "GRFMDownloader.h"

@interface GRFMDownloadManager : NSObject

+ (instancetype)sharedInstance;

- (void)download:(NSURL *)url
                    info:(DownloadInfoBlock)info
          progressChange:(DownloadProgressChangeBlock)progressChange
             stateChange:(DownloadStateChangeBlock)stateChange
                 success:(DownloadSuccessBlock)success
                   faile:(DownloadFailedBlock)faile;

- (GRFMDownloaderState)downloadStateWithURL:(NSURL *)url;
- (float)downloadProgressWithURL:(NSURL *)url;

- (void)cancelWithURL:(NSURL *)url;
- (void)pauseWithURL:(NSURL *)url;
- (void)resumeWithURL:(NSURL *)url;

- (void)cancelAll;
- (void)resumeAll;

@end
